{{--{{ Form::open(array('route' => 'customers.login','files'=>true,'id'=>'pages')) }}--}}
{{--<input type="text" name="name">--}}
{{--<input type="text" name="mobile">--}}
{{--<select name="p_id">--}}
{{--<option value="3">山西省</option>--}}
{{--</select>--}}
{{--<select name="c_id">--}}
{{--<option value="4">太原市</option>--}}
{{--</select>--}}
{{--<input type="radio" name="sex" value="1">nan--}}
{{--<input type="radio" name="sex" value="2">nv--}}



{{--<input type="submit">--}}
{{--{{ Form::close() }}--}}

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>雷谛科技</title>
<meta name="viewport" content="width=device-width,initial-scale=1" />
<link rel="stylesheet" type="text/css" href="{{ URL::asset('newstyle/css/drink.css?v=3') }}" />
</head>
<body>
<header id="header">
  <a href="{{ route('customers.index') }}">
    <img src="{{ URL::asset('newstyle/images/arrow_left.png') }}" alt="" width="8" class="arrow_left">
  </a>
  <h3>个人资料</h3>
</header>
<section id="section3">
  <ul>
    <li>
      <a href="javascript:void(0)">
        头像<span><img src="{{ $customer->avatar }}" alt="" width="60" align="absmiddle"></span>
      </a>
    </li>
    <li>
      <a href="{{ route('customers.edit',array('id'=>$customer->id,'se'=>'1')) }}">
        姓名<span>{{ $customer->name }}</span>
      </a>
    </li>
    <li class="man">
        性别<span style="float: right; padding-right: 30px;" id="sex">@if($customer->sex == 1)男 @else 女 @endif</span>
    </li>
    <li>
      <a href="{{ route('customers.edit',array('id'=>$customer->id,'se'=>'2')) }}">
        电话<span>{{ $customer->mobile }}</span>
      </a>
    </li>
    <li>
      <a href="{{ route('customers.edit',array('id'=>$customer->id,'se'=>'3')) }}">
        地区<span>{{ $customer->cityname->name }}</span>
      </a>
    </li>
  </ul>
</section>
<section id="section4">
  <ul>
    <li>
      <a href="">
        会员等级<span>@if($customer->type == 0)粉丝
                                                         @elseif($customer->type == 1)试用客户
                                                           @elseif($customer->type == 2)会员客户
                                                            {{--@elseif($customer->type == 3)优质客户--}}
                                                             @elseif($customer->type == 4)VIP客户
                                                              @elseif($customer->type == 5)至尊VIP
                                                              @endif</span>
      </a>
    </li>
    <li>
      <a href="">
        我的邀请码<span>{{ $customer->invite }}</span>
      </a>
    </li>
    <li>
      <a href="">
        我的积分<span>{{ $customer->all_points-$customer->use_points }}</span>
      </a>
    </li>
  </ul>
</section>
<div class="mask" style="display:none;">
  <div class="maskcon">
    <p>修改性别</p>
    <ul>
      <li onclick="ajax_edit(1);">
        <img src="{{ URL::asset('newstyle/images/man.png') }}" alt="" width="17">
        男
      </li>
      <li onclick="ajax_edit(2);">
        <img src="{{ URL::asset('newstyle/images/femal.png') }}" alt="" width="17">
        女
      </li>
    </ul>
  </div>
</div>
<script src="{{ URL::asset('newstyle/js/jquery.js') }}"></script>
<script>
  $(function(){
    $("#section3 ul li.man").click(function(){
      $(".mask").show();
    })
//    $(".mask").click(function(){
//      $(this).hide();
//    })
  })
  function ajax_edit(sex){
//   var sex_span = $('#sex').html();
//   alert(sex_span);
    $.post('{{ route("customers.ajax_edit") }}',{sex:sex},function(data){
        if(sex == 1){
            $('#sex').html('男');
        }else if(sex == 2){
            $('#sex').html('女');
        }
      $(".mask").hide();
    })
  }
</script>
</body>
</html>
